Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to a pure PEP621 project configuration #1550

Merged
merged 7 commits into from
Nov 22, 2023

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented Nov 22, 2023

Inspired by beeware/toga#2229, a full PEP621 configuration update for Briefcase.

There's no functional difference; the one technical benefit (aside from keeping up with modern standards) is that because we're using setuptools_scm, we don't need to maintain MANIFEST.in any more. The source discovery process is also much simpler - it requiring no explicit setuptools configuration, as we're entirely relying on one of the "default" project layout patterns.

I've audited the generated tarballs, and they have identical content, except for:

  • the missing setup.cfg and MANIFEST.in files,
  • a missing not-zip-safe file in the egg-info. This file was needed in the days of eggs and easy-install, but is now considered deprecated.
  • minor changes to the METADATA file in the wheel:
    • A different format for authors and license
    • Slightly different URL definitions
    • No platform: any declaration. This has been subsumed by wheel tagging.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Copy link
Member

@rmartin16 rmartin16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial comments. i'll probably repeat the build artifact review so 2 sets of eyes looked at it.

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
Copy link
Member

@rmartin16 rmartin16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compared the metadata in the sdist and wheel before and after. LGTM.

@freakboy3742 freakboy3742 merged commit 1687c5e into beeware:main Nov 22, 2023
44 checks passed
@freakboy3742 freakboy3742 deleted the pep621 branch November 22, 2023 04:14
@mhsmith
Copy link
Member

mhsmith commented Nov 22, 2023

I think this has broken Toga's CI, though I don't know how. See the "Install dependencies" step:

Collecting git+https://github.com/beeware/briefcase.git
  Cloning https://github.com/beeware/briefcase.git to /tmp/pip-req-build-ogtlw61a
  Running command git clone --filter=blob:none --quiet https://github.com/beeware/briefcase.git /tmp/pip-req-build-ogtlw61a
  Resolved https://github.com/beeware/briefcase.git to commit 1687c5e4590c43580fec7e594a880081c43603ea
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: UNKNOWN
  Building wheel for UNKNOWN (pyproject.toml): started
  Building wheel for UNKNOWN (pyproject.toml): finished with status 'done'
  Created wheel for UNKNOWN: filename=UNKNOWN-0.3.17.dev114+g1687c5e4-py3-none-any.whl size=2660 sha256=1e18f288143411c2f7d189deb5d892b0735114a1a254be3db9462014cce8ed7b
  Stored in directory: /tmp/pip-ephem-wheel-cache-vtk5u_v1/wheels/e4/98/7a/33d68b092d9141[556](https://github.com/beeware/toga/actions/runs/6960869033/job/18941360266#step:4:557)f79cf6c5d442c85bec3e2d91effd31094
Successfully built UNKNOWN
Installing collected packages: UNKNOWN
Successfully installed UNKNOWN-0.3.17.dev114+g1687c5e4

@rmartin16
Copy link
Member

rmartin16 commented Nov 22, 2023

👀

I can't replicate locally....i wonder if setuptools is too old in CI...

[edit] or more appropriately...if pip is too old; its using Ubuntu's pip

@rmartin16
Copy link
Member

rmartin16 commented Nov 22, 2023

Indeed...Ubuntu 22.04 installs pip v22.0.2 and it will install briefcase as UNKNOWN. It should be upgraded first.

@freakboy3742
Copy link
Member Author

Hrm - that's worth a release note and a FAQ. PR incoming.

@freakboy3742
Copy link
Member Author

No - wait - this only affects source installs, right? If you're installing a wheel, an older pip will work fine (or, at least as well as it ever has). This is only an issue for dev installs and/or GitHub installs - am I correct?

@rmartin16
Copy link
Member

Right; the wheel is the same....but the build process is pretty different now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants